home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 2 / Amiga Tools 2.iso / tools / jade / lisp / init.jl < prev    next >
Lisp/Scheme  |  1995-03-09  |  2KB  |  75 lines

  1. ;;;; init.jl -- Standard initialisation script
  2. ;;;  Copyright (C) 1993, 1994 John Harper <jsh@ukc.ac.uk>
  3.  
  4. ;;; This file is part of Jade.
  5.  
  6. ;;; Jade is free software; you can redistribute it and/or modify it
  7. ;;; under the terms of the GNU General Public License as published by
  8. ;;; the Free Software Foundation; either version 2, or (at your option)
  9. ;;; any later version.
  10.  
  11. ;;; Jade is distributed in the hope that it will be useful, but
  12. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. ;;; GNU General Public License for more details.
  15.  
  16. ;;; You should have received a copy of the GNU General Public License
  17. ;;; along with Jade; see the file COPYING.  If not, write to
  18. ;;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20. (message "Initialising; wait..." t)
  21.  
  22. (load "lisp")
  23. (load "loadkeys")
  24. (load "autoload.jl")    ; don't want any compiled version
  25. (load "windows")
  26. (load "buffers")
  27. (load "modes")
  28. (load "edit")
  29. (load "prompt")
  30.  
  31. (load "site-init" t)
  32.  
  33. ;; Now try to interpret the user's startup file
  34. (or
  35.   (load (file-name-concat (user-home-directory) ".jaderc") t t)
  36.   (load "default" t))
  37.  
  38. ;; If we're on an Amiga and the variable `amiga-no-menus' isn't set load
  39. ;; some menus.
  40. (when (and (amiga-p) (not (boundp 'amiga-no-menus)))
  41.   (load "loadmenus"))
  42.  
  43. ;; Set up the first window as command shell type thing
  44. (set-buffer-special default-buffer t)
  45. (with-buffer default-buffer
  46.   (lisp-mode))
  47.  
  48. ;; Print a message in the first buffer
  49. (format default-buffer
  50.     ";; Jade version %d.%d, Copyright (C) 1993, 1994 John Harper
  51. ;; Jade comes with ABSOLUTELY NO WARRANTY; for details see the file COPYING\n\n"
  52.     (major-version-number)
  53.     (minor-version-number))
  54. ;; Don't want it in the undo list
  55. (setq buffer-undo-list nil)
  56.  
  57. ;; Use all arguments which are left.
  58. (let
  59.     (arg)
  60.   (while (setq arg (car command-line-args))
  61.     (cond
  62.       ((equal "-f" arg)
  63.     (setq command-line-args (cdr command-line-args))
  64.     (funcall (read-from-string (car command-line-args))))
  65.       ((equal "-l" arg)
  66.     (setq command-line-args (cdr command-line-args))
  67.     (load (car command-line-args)))
  68.       ((equal "-q" arg)
  69.     (throw 'quit 0))
  70.       (t
  71.     (set-current-buffer (open-file arg))))
  72.     (setq command-line-args (cdr command-line-args))))
  73.  
  74. (princ "ok." t)
  75.